package cn.etynit.mms.feign;

import cn.etynit.domain.ExpenseTapWater;
import cn.etynit.dto.RechargeDto;
import cn.etynit.mms.fallback.ExpenseTapWaterServiceFallbackFactory;
import cn.etynit.result.JsonResult;
import cn.etynit.vo.RechargeVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
@FeignClient(contextId = "expenseTapWaterService",value = "service-expense",path = "/expenseTapWater",fallbackFactory = ExpenseTapWaterServiceFallbackFactory.class)
public interface ExpenseTapWaterService {
    @RequestMapping(value="/save",method= RequestMethod.POST)
    JsonResult saveOrUpdate(@RequestBody ExpenseTapWater expenseTapWater);

    @RequestMapping(value="/recharge",method= RequestMethod.POST)
    JsonResult recharge(@RequestBody RechargeVo rechargeVo);

    @RequestMapping(value = "/selectByUserId/{userId}",method = RequestMethod.GET)
    JsonResult selectByUserId(@PathVariable("userId")Long userId);
}
